Skip to main content

All Questions

1vote
1answer
2kviews

diff marking each line as old, new, or unchanged

I need to diff two unsorted text files with the output marking every line as either old, new, or unchanged. The marks should appear at the beginning or end of the line, and there should be no other ...
Psychonaut's user avatar
3votes
1answer
708views

How to highlight output from diff command and make them side by side?

I have two files $ cat file1.txt UUXX:1 UUXX:2 $ cat file2.txt UUXX:3 UUXX:1 I want to use this command $ diff --old-group-format=$'\e[0;31m%<\e[0m' --new-group-format=$'\e[0;31m%>\e[0m' --...
Noor's user avatar
4votes
2answers
2kviews

Bash Script for showing difference between two text files

Lets say I have two lists: guests-2016.txt: Peter Michael Frank Dirk guests-2017.txt: Mark Michael Dirk Lilly How may I create two new lists of guests Guests that were in guests-2016.txt but are ...
NoobieNoob's user avatar
2votes
1answer
2kviews

Comparing two files and writing mismatched rows along with mismatched columns. Pointing out the mismatched columns is my main problem statement

I got a requirement where I need to compare two files wrt to each columns and write the corresponding difference in another file along with some identification showing mismatched columns. Pointing out ...
piyush's user avatar
0votes
1answer
37views

Error messages are not getting displayed while comparing the datatypes from 2 files in shell script

We have a requirement to compare the datatypes. I have created .txt files with datatypes and wrote a query to get the datatypes from the netezza system table (we are using netezza database) and ...
Samah's user avatar
2votes
2answers
3kviews

differentiating two files and getting the unique output in third one

I'm very new to shell scripting and learning it now. I have two files. File 1: 1 StartInstall, CDM_2.5B263, OK 2 EndInstall, CDM_2.5B263, SUCCESS 3 StartPatch, CDM_2.5.0.2B1, OK ...
Parul kusmatia's user avatar
5votes
2answers
772views

Search directories for multi line string

Looking for a way to recursively search a repository for all files containing a multi line string and return the file names that contain it. The paragraph is just a header approx 30 lines. So I know ...
Gooner1990's user avatar
3votes
2answers
901views

Find differences in file and sorting file by key

So I have two language files, english and french. They are in this format: key=translation An example in English would be: ui.title=My Title And in French: ui.title=Mon Titre So I need a script ...
Chris Smith's user avatar
3votes
3answers
4kviews

compare files line by line and create new one bash programming

I have two text files. File 2 has logs over 1,000,000. File 1 has IP addresses line by line. I want to read file 2 lines and search these lines in file 1, I mean: file 1: 34.123.21.32 45.231.43.21 ...
DessCnk's user avatar
3votes
1answer
2kviews

Reading two files into an IFS while loop -- Is there a way to get a zero diff result in this case?

I have a text file full of several hundred lines of sequences like this: b 29. b 52. c 84. c 83. c 94. c 93. c 61. b 38. c 81. c 92. c 28. c 37. c ...
ixtmixilix's user avatar

close